import {Select} from 'antd'

const SelectGiftDuration = (props: any) => {
  const {onChange} = props

  const durations = [{key: 7, value: '一周'}, {key: 15, value: '半个月'}, {key: 30, value: '一个月'}, {
    key: 90,
    value: '三个月'
  }, {key: 150, value: '五个月'}, {key: 365, value: '一年'}]

  return (
    <Select
      showSearch
      allowClear
      autoClearSearchValue
      onChange={onChange}
      placeholder={'请选择时长周期'}
    >
      {durations.map((item) => (
        <Select.Option key={item.key} value={item.key}>{item.value}</Select.Option>
      ))}
    </Select>
  );
};

export default SelectGiftDuration;
